Skip to content

improvement(external-endpoints): v2 versions with clean signatures + updated docs based on openapi spec - #5273

Merged
TheodoreSpeaks merged 221 commits into
stagingfrom
improvement/v2-endpoints
Aug 11, 2026
Merged

improvement(external-endpoints): v2 versions with clean signatures + updated docs based on openapi spec#5273
TheodoreSpeaks merged 221 commits into
stagingfrom
improvement/v2-endpoints

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Introduces a parallel /api/v2 external API with consistent authentication, response envelopes, pagination, errors, and resource semantics. Existing v1 wire behavior remains available; breaking cleanup and the expanded resource model live in v2.

The v2 OpenAPI reference is now generated from the shared Zod route contracts. Schema descriptions, examples, formats, bounds, nullability, and requiredness stay next to the runtime validation they document, eliminating the hand-maintained spec drift that previously existed.

Highlights

  • Adds and expands v2 APIs for workflows and runs, files and signed uploads, tables, knowledge bases, logs, billing, folders, credentials, MCP servers, skills, and custom tools.
  • Completes workflow CRUD, version, execution, status, cancellation, resume, filtering, sorting, and pagination surfaces.
  • Adds file metadata with share status plus explicit share and unshare operations.
  • Adds ownerEmail to knowledge-base and table metadata and rejects unsupported table required input.
  • Centralizes protected operations behind shared Principal/application use cases across public APIs, internal APIs, and Copilot adapters.
  • Returns access denied when a caller can see a resource but lacks mutation permission, while continuing to hide resources they cannot see.
  • Persists signed multipart upload sessions and unifies file and knowledge-document upload lifecycles.
  • Generates and validates seven OpenAPI documents covering 128 operations directly from the contracts.
  • Updates the API reference and CI drift checks around the generated specifications.
  • Integrates the latest staging changes; the upload-session migration is sequenced as 0289 after staging's 0287 and 0288 migrations.

Compatibility and rollout

  • v1 endpoints remain available and retain their existing wire contracts.
  • The v2 surface is gated behind the shared v2 API feature flag.
  • Database changes are additive and backward-compatible with the deployed application version.

Verification

  • bun run check:api-validation:strict
  • bun run check:openapi
  • bun run check:migrations
  • env NODE_OPTIONS=--max-old-space-size=8192 bun run type-check in apps/sim
  • 215 focused API, authorization, knowledge, table, folder, and provenance tests
  • bun run test in packages/audit
  • bun run type-check in packages/testing
  • helm lint helm/sim --values helm/sim/ci/default-values.yaml
  • bun run scripts/check-cron-parity.ts

Checklist

  • Code follows project style guidelines
  • Self-reviewed the conflict resolutions and generated migration chain
  • Tests added or updated and passing
  • Generated OpenAPI output is current and contract-validated
  • No new API-boundary validation drift
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement

waleedlatif1 and others added 30 commits April 3, 2026 23:30
…ership workflow edits via sockets, ui improvements
…ration, signup method feature flags, SSO improvements
* feat(posthog): Add tracking on mothership abort (#4023)

Co-authored-by: Theodore Li <theo@sim.ai>

* fix(login): fix captcha headers for manual login  (#4025)

* fix(signup): fix turnstile key loading

* fix(login): fix captcha header passing

* Catch user already exists, remove login form captcha
…nts, secrets performance, polling refactors, drag resources in mothership
…endar triggers, docs updates, integrations/models pages improvements
…mat, logs performance improvements

fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179)
fix(landing): return 404 for invalid dynamic route slugs (#4182)
improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170)
fix(gemini): support structured output with tools on Gemini 3 models (#4184)
feat(brightdata): add Bright Data integration with 8 tools (#4183)
fix(mothership): fix superagent credentials (#4185)
fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
v0.6.46: mothership streaming fixes, brightdata integration
* refactor: enforce copilot table application boundary

* fix(tables): finish application boundary migration

* fix(tables): restore scoped copilot imports

* fix(tables): compose copilot commands atomically

* fix(tables): preserve workflow group scheduling

* fix(tables): complete fixed copilot composition

* fix(tables): reject enrichment output mutation

* fix(tables): complete authorized application boundary
* fix(workflows): migrate Copilot application boundary

* fix(workflows): finish delegated application migration

* fix(workflows): encode VFS folder aliases

* fix(workflows): close application composition gaps

* fix(workflows): preserve VFS validation errors

* fix(workflows): complete application boundary migration

* test(workflows): format canonical binding coverage

* fix(workflows): scope executor metadata reads

* fix(workflows): bind executor metadata targets
# Conflicts:
#	apps/sim/app/api/knowledge/search/route.ts
#	apps/sim/lib/copilot/request/tools/tables.test.ts
# Conflicts:
#	apps/sim/app/api/mcp/serve/[serverId]/route.ts
#	apps/sim/lib/copilot/tools/handlers/workflow/mutations.ts
* feat(api): generate v2 OpenAPI from contracts

* fix(api): preserve string boolean wire defaults

* fix(api): document file download headers

* fix(docs): use TypeScript CLI with Next.js

* fix(docs): avoid client-rendered theme script

* fix(api): document departed audit default

* feat(api): replace legacy core docs with v2

* feat(api): generate v2 OpenAPI from contracts

* feat(api): refine generated v2 OpenAPI docs

* fix(docs): align localized v2 execution examples
@TheodoreSpeaks
TheodoreSpeaks merged commit 263e3ca into staging Aug 11, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants